﻿@using LastoRevival.Website.Engine;

<!DOCTYPE html>
<html>
<head runat="server">
	<title>
		@ViewBag.Title
	</title>
	
	<link rel="stylesheet" href="@Url.Content("~/Content/themes/base/jquery-ui.css")" type="text/css" media="all" />
	<script src="@Url.Content("~/Scripts/jquery-2.0.3.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery-ui-1.10.3.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.cookie.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/jquery.blockUI-2.64.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/lasto.js")" type="text/javascript"></script>
	<script src="@Url.Content("~/Scripts/blockui.js")" type="text/javascript"></script>
	
	@if (Html.Profile().IsAdministrator)
	{
		@Html.Partial("AdminFunctions")
	}
	
	@Html.Raw(Html.GetCurrentTheme().CssPaths)
	
	<script type="text/javascript">

		checkMobile();

		function checkMobile()
		{
			if (!isMobileBrowser())
				return; // nothing to do

			// see if the mobile user has selected a layout
			var cookie = $.cookie("@OverridableViewEngine.LayoutCookieName");			

			if (cookie == null)
			{
				// direct to landing page so user can opt to try the mobile theme
				window.top.location = "@Url.Action("Landing", "Mobile")?returnUrl=" + window.location.href;
			}

			// user has already selected a layout, engine will handle it.
		}
	
	</script>
	
</head>
<body>
<div id="page">

		<div id="breadcrumbs-container">
			@Html.Partial("BreadCrumbs")
		</div>
	
		<div id="logindisplay">
			@Html.Partial("LoginState")
		</div>
		
		<div id="header">
		
			<img src="/images/transparent.gif" id="headerImage" alt="" />

		</div>
		
		
		<div id="container">
		
			@RenderBody()
			
		</div>		
		
		
		<div id="footer">
		
			<a href="@Url.Action("MobileOnce", "Mobile")?returnUrl=@Request.Url">@LanguageLoader.GetWord("View Mobile Site")</a>
			
			@Html.Partial("AdminFunctions")

		</div>
		
	</div>
</body>
</html>
